package com.hrprojectback.dto;

import com.hrprojectback.enums.BaseEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponseDTO {

    private int code;


    private String message;


    private Object data;


    private String token;

    public ResponseDTO(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public ResponseDTO(int code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public ResponseDTO(BaseEnum e) {
        this.code = e.getCode();
        this.message = e.getMessage();
    }

    public ResponseDTO(BaseEnum e, Object data) {
        this.code = e.getCode();
        this.message = e.getMessage();
        this.data = data;
    }


}
